/************************************************************
xyx
 */

#import <Foundation/Foundation.h>

#define D_MINUTE	60
#define D_HOUR		3600
#define D_DAY		86400
#define D_WEEK		604800
#define D_YEAR		31556926

@interface NSDate (Category)
// Decomposing dates
@property (readonly) NSInteger nearestHour;
@property (readonly) NSInteger hour;
@property (readonly) NSInteger minute;
@property (readonly) NSInteger seconds;
@property (readonly) NSInteger day;
@property (readonly) NSInteger month;
@property (readonly) NSInteger week;
@property (readonly) NSInteger weekday;
@property (readonly) NSInteger nthWeekday; // e.g. 2nd Tuesday of the month == 2
@property (readonly) NSInteger year;

-(NSString *)dateStr;

-(NSString *)dateLineStr;

-(NSString *)dateStrOnlyYearAndMonth;

-(NSString *)dateStrWithYearMonthDay;//****年**月**日

-(NSString *)dateLineStrOnlyDay;//****-**-**

- (NSInteger)getNumberOfDaysInMonth;

@end
